import { prop } from '@typegoose/typegoose'
import { EntityModel } from '@midwayjs/typegoose'

@EntityModel()
export class Role {
  @prop({ unique: true })
  public id: string

  @prop({ unique: true })
  public name: string

  @prop()
  public pid: string

  @prop()
  public children: Role[]

  // menus的id数组
  @prop()
  public menus: string[]
}
